SQL Tasks for Day 3 of Internship

1. Retrieve all information about Marks of the Student who has scored less than 20 in Test 2.

SELECT * FROM Marks WHERE TEST2 < 20

2. Select the first 5 Students Name, CGPA, Company ID (CID), Job role, and Package from all the Students.

SELECT First_name,CGPA,CID,Job_role,Package FROM Students LIMIT 5

3. Retrieve all information about Subjects which has 50 teaching hours.

SELECT * FROM Subjects WHERE Hours = 50

4. Retrieve all information of the Lecturer identified by the ID '237A'.

SELECT * FROM Lecturers WHERE LID = '237A'

5. Retrieve all information about Students who are pursuing their studies in the Civil Engineer Branch 'CV1'.

SELECT * FROM Students WHERE Branch = 'CV1'

6. Retrieve the Student USN, Subject ID (SID), and Test2 Marks of all the Students.

SELECT Usn,SID,Test2 FROM Marks

7. Select the first 9 Student USN and Names.

SELECT Usn,First_name FROM Students LIMIT 9

8. Select the first 5 Subject IDs (SID) and Names from all the Subjects.

SELECT SID,Subject_name FROM Subjects LIMIT 5

9. Select the first 4 Lecturers Name, Designation, College, and Branch from all the Lecturers.

SELECT First_name,Designation,College,Branch FROM Lecturers LIMIT 4

10. Select the first 4 Subjects from all the Subjects.

SELECT * FROM Subjects LIMIT 4

11. Select the first 6 USNs, and Subject IDs (SID) from all the Marks.

SELECT Usn,SID FROM Marks LIMIT 6

12. Select the first 3 Lecturers from all the Lecturers.

SELECT * FROM Lecturers LIMIT 3

13. Select the first 3 Company IDs (CID) and their names from all the Companies.

SELECT CID,Company_name FROM Companies LIMIT 3

14. Select the first 5 Students from all the Students.

SELECT * FROM Students LIMIT 5

15. Select the first 3 Company Name, Students Placed, and Package Offered from all the Companies.

SELECT Company_name,Students_placed,Package FROM Companies LIMIT 3